CSCI E-92: Application Note 19 Turning on Optimization for GCC ------------------------------- In order to reduce the size of the text segment, follow these instructions: o In CodeWarrior, open the project for which optimization will be turned on o Navigate to: Project -> Properties o In the left pane of the window that just opened, click on the arrow that points at "C/C++ Build" to see more detailed options o Under "C/C++ Build", click on "Settings" o In the right pane, under "ARM Ltd Windows GCC C Compiler", click on "Optimization" o On the right, change Optimization level from "None (-O0)" to "Optimize size (-Os)" o Click on "OK" in the bottom right of that window o Perform a clean build of the entire project by selecting: Project -> Clean... with the appropriate project selected and with "Start a build immediately" checked for the selected project After Recompiling with Optimization for Space --------------------------------------------- o Ensure that any code that relies on the contents of the stack is appropriately modified to deal with the new optimized code (see Application Note 18 for the stack contents for a new process compiled with -Os)